import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import home from '@/components/home'
import shopcar from '@/components/shopcar/car'
import newslist from '@/components/news/newslist'
import newsinfo from '@/components/news/newsinfo'
import photolist from '@/components/photo/photolist'
import photoinfo from '@/components/photo/photoinfo'
import goodslist from '@/components/goods/goodslist'
import goodsinfo from '@/components/goods/goodsinfo'
import goodsesc from '@/components/goods/goodsesc'
import goodscom from '@/components/goods/goodscom'

Vue.use(Router)

export default new Router({
  routes: [
  //当服务器启动的时候默认进入home中
    {
      path: '/',
      redirect:'/home'
    },
    {
      path: '/home',
      component: home
    },
    {
      path: '/shopcar',
      component: shopcar
    },
    {
    	path:'/news/newslist',
    	component: newslist
    },
    {
      path:'/news/newsinfo/:id',
      component:newsinfo
    },
    {
      path:'/photo/photolist',
      component:photolist
    },
    {
      path:'/photo/photoinfo/:id',
      component:photoinfo
    },
    {
      path:'/goods/goodslist',
      component:goodslist
    },
    {
      path:'/goods/goodsinfo/:id',
      component:goodsinfo
    },
    {
      path:'/goods/goodsesc/:id',
      component:goodsesc
    },
    {
      path:'/goods/goodscom/:id',
      component:goodscom
    }
  ]
})
